package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.User;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Created by ZhuChunXiao on 2017/7/6.
 * 好友关系
 */
@Entity
@Table(name="sys_friend")
public class Friend extends BaseFlowEntity {
    private static final long serialVersionUID = -4950193752774587720L;

    /**
     * 自己
     */
    private User own;
    /**
     * 好友
     */
    private User friend;

    @ManyToOne(fetch = FetchType.LAZY)
    public User getOwn() {
        return own;
    }

    public void setOwn(User own) {
        this.own = own;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public User getFriend() {
        return friend;
    }

    public void setFriend(User friend) {
        this.friend = friend;
    }
}
